﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    layui.use(['jquery', 'form', 'tablePlug', 'common'], function () {
        var form = layui.form,
            $ = layui.$,
            common = layui.common;
        //监听提交
        form.on('submit(saveBtn)', function (data) {
            var postData = data.field;
            common.submitForm({
                url: "/SystemSecurity/DbBackup/SubmitForm",
                param: postData,
                success: function () {
                    common.parentreload("data-search-btn");
                }
            })
            return false;
        });
    });
</script>
<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <blockquote class="layui-elem-quote layui-text">
                注意:备份成功后，请将备份文件下载到本地保存！
            </blockquote>
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item">
                    <label class="layui-form-label required">数据库名</label>
                    <div class="layui-input-block">
                        <select id="F_DbName" name="F_DbName">
                            <option value="WaterCloudNetDb">WaterCloudBase</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">备份名称</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_FileName" name="F_FileName" value="@WaterCloud.Code.Utils.CreateNo()" placeholder="请输入备份名称" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备份模式</label>
                    <div class="layui-input-block">
                        <select id="F_BackupType" name="F_BackupType">
                            <option value="1">完整备份</option>
                            <option value="2">差异备份</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea id="F_Description" name="F_Description" class="layui-textarea" placeholder="请输入备注"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <button class="layui-btn" lay-submit id="submit" lay-filter="saveBtn">确认保存</button>
    </div>
</body>
